package com.hx.newfeature;

import java.util.Map;
import java.util.concurrent.ConcurrentSkipListMap;

/**
 * @author jxlgcmh
 * @date 2020-08-16 08:13
 * @description 跳表的使用
 */
public class MyConcurrentSkipListMap {
    public static void main(String[] args) {
        ConcurrentSkipListMap<String, String> skipListMap = new ConcurrentSkipListMap<>();
        skipListMap.put("A", "a");
        skipListMap.put("B", "b");
        skipListMap.put("C", "c");
        skipListMap.put("D", "d");
        skipListMap.put("E", "e");
        for (Map.Entry<String, String> entry : skipListMap.entrySet()) {
            System.out.println(entry.getKey() + ":" + entry.getValue());
        }
        String e = skipListMap.get("E");
        System.out.println(e);
    }
}
